﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/AdminMasterPage.master" AutoEventWireup="true" CodeFile="Firewall.aspx.cs" Inherits="Admin_Firewall" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
    <link href="../Styles/ContactSubmit.css" rel="stylesheet" type="text/css" />
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" Runat="Server">
    <div style="font-size:x-large;text-align:left">Firewall</div>
    <div style="text-align: left;">
        <div>
            <div><b>Customer:</b></div> 
            <div><asp:Literal ID="litCustomer" runat="server"></asp:Literal></div>        
        </div>
        <br />
        <div class="row">
            <div class="header">Code</div>
            <div class="content">            
                <asp:TextBox ID="txtCode" runat="server" CssClass="textbox"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
                    ErrorMessage="(*)" ControlToValidate="txtCode" ForeColor="Red" 
                    SetFocusOnError="True"></asp:RequiredFieldValidator>
            </div>
        </div>
        <div class="row">
            <div class="header">Name</div>
            <div class="content">            
                <asp:TextBox ID="txtName" runat="server" CssClass="textbox"></asp:TextBox>            
                <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" 
                    ErrorMessage="(*)" ControlToValidate="txtName" ForeColor="Red" 
                    SetFocusOnError="True"></asp:RequiredFieldValidator>
            </div>
        </div>
        <div class="row">
            <div class="header">IP Address</div>
            <div class="content">            
                <asp:TextBox ID="txtIPAddress" runat="server" CssClass="textbox"></asp:TextBox> 
                <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" 
                    ErrorMessage="(*)" ControlToValidate="txtIPAddress" ForeColor="Red" 
                    SetFocusOnError="True"></asp:RequiredFieldValidator>
            </div>
        </div>
        <div class="row">
            <div class="header">Fee</div>
            <div class="content">            
                <asp:TextBox ID="txtFee" runat="server" CssClass="textbox"></asp:TextBox> 
                <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" 
                    ErrorMessage="(*)" ControlToValidate="txtFee" ForeColor="Red" 
                    SetFocusOnError="True"></asp:RequiredFieldValidator>
            </div>
        </div>
        <div class="row">
            <div class="header">Effective Date</div>
            <div class="content">            
                <asp:TextBox ID="txtFromDate" runat="server" Width="100px"></asp:TextBox>&nbsp;
                <img id="Img1" alt="calender" runat="server" src="~/Resources/Images/calendar.gif" />
                <ajaxToolkit:CalendarExtender
                    ID="CalendarFromDate" runat="server" 
                    DefaultView="Days" TargetControlID="txtFormDate"  PopupButtonID="Img1"></ajaxToolkit:CalendarExtender>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" 
                    ErrorMessage="(*)" ControlToValidate="txtFormDate" ForeColor="Red" 
                    SetFocusOnError="True"></asp:RequiredFieldValidator>
                &nbsp;
                <asp:TextBox ID="txtToDate" runat="server" Width="100px"  ></asp:TextBox>&nbsp;
                <img id="Img2" alt="calender" runat="server" src="~/Resources/Images/calendar.gif" />
                <ajaxToolkit:CalendarExtender
                    ID="CalendarToDate" runat="server" 
                    DefaultView="Days" TargetControlID="txtToDate"  PopupButtonID="Img2"></ajaxToolkit:CalendarExtender>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator6" runat="server" 
                    ErrorMessage="(*)" ControlToValidate="txtToDate" ForeColor="Red" 
                    SetFocusOnError="True"></asp:RequiredFieldValidator>
            </div>
        </div>
        <br />
        <div>
            <div style="font-size:x-large;text-align:left">Devices</div>
            <div class="content">            
                <asp:GridView ID="grdDevices" runat="server" AutoGenerateColumns="False" Width="98%"
                    BackColor="White" BorderColor="#CCCCCC" BorderStyle="None" BorderWidth="1px" CellPadding="3" 
                    EmptyDataText="No Device" ShowHeaderWhenEmpty="True" >
                    <Columns>                             
                        <asp:TemplateField ItemStyle-Width="30px" ItemStyle-HorizontalAlign="Center">                    
                            <ItemTemplate>
                                <asp:CheckBox ID="chkBindToFirewall" runat="server" Checked='<%# Eval("IsCheck") %>' />
                            </ItemTemplate>                  

                        <ItemStyle HorizontalAlign="Center" Width="30px"></ItemStyle>
                        </asp:TemplateField>

                        <asp:BoundField HeaderText="Name" DataField="Name"  />

                        <asp:TemplateField>
                            <HeaderTemplate>OS</HeaderTemplate>
                            <ItemTemplate>
                                <%# Eval("OS.Name") %>
                            </ItemTemplate>                    
                        </asp:TemplateField>

                        <asp:BoundField HeaderText="IP Address" DataField="IP" />
                        <asp:BoundField HeaderText="Fee" DataField="Fee" />

                    </Columns>
                    <FooterStyle BackColor="White" ForeColor="#000066" />
                    <HeaderStyle BackColor="#006699" Font-Bold="True" ForeColor="White" />
                    <PagerStyle BackColor="White" ForeColor="#000066" HorizontalAlign="Left" />
                    <RowStyle ForeColor="#000066" />
                    <SelectedRowStyle BackColor="#669999" Font-Bold="True" ForeColor="White" />
                    <SortedAscendingCellStyle BackColor="#F1F1F1" />
                    <SortedAscendingHeaderStyle BackColor="#007DBB" />
                    <SortedDescendingCellStyle BackColor="#CAC9C9" />
                    <SortedDescendingHeaderStyle BackColor="#00547E" />

                </asp:GridView>
             </div>
        </div>
        <br />
        <div class="row" style="vertical-align: bottom">
            <asp:Button ID="btnSave" runat="server" onclick="btnSave_Click" Text="Save" Width="81px" />
            &nbsp;or&nbsp;
            <asp:LinkButton ID="btnCancel" runat="server" onclick="btnCancel_Click" Text="Save" Width="81px">Cancel</asp:LinkButton>
        </div>
    </div>
</asp:Content>

